﻿<!DOCTYPE html>
<html>
<!-- 安全活动里程碑 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .elst-select-mini {
            margin-bottom: 10px;
        }
    </style>
</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <p class="main-label">{{SafetyMilestone.activityName+mark.m}}</p>
                        <p class="lh35"> {{Form.activityName}}</p>
                    </div>
                </el-col>
                <el-col :span="11" offset="2">
                    <div class="elst-select-mini">
                        <p class="main-label">{{SafetyMilestone.activityTime+mark.m}}</p>
                        <p class="lh35"> {{Form.activityTime}}</p>
                    </div>
                </el-col>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <p class="main-label">{{SafetyMilestone.activityTimeItem+mark.m}}</p>
                        <p class="lh35"> {{Form.activtyTimeinterval}}</p>
                    </div>
                </el-col>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <p class="main-label">{{SafetyMilestone.prizeResearchProcess+mark.m}}</p>
                        <p class="lh35"> {{Form.prizeResearchProcess}}</p>
                    </div>
                </el-col>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <p class="main-label">{{SafetyMilestone.main+mark.m}}</p>
                        <p class="lh35"> {{Form.main}}</p>
                    </div>
                </el-col>
            </el-row>
            <el-row>
                <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" border
                    @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
                    <el-table-column type="selection" style="
    padding-top: 0px;
    padding-bottom: 0px;
    " algin="center" width="55" :reserve-selection="true">
                    </el-table-column>
                    <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                        show-overflow-tooltip="true"></el-table-column>
                    <el-table-column prop="attachmentName" :label="SafetyMilestone.attachmentName" width="">
                    </el-table-column>
                    <el-table-column prop="createTime" :label="SafetyMilestone.uploadTime" width="200">
                    </el-table-column>
                    <el-table-column prop="mark01" :label="SafetyMilestone.uploadPerson" width="200">
                    </el-table-column>
                </el-table>
            </el-row>
            <el-row type="flex" justify="end">
                <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                    :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                    :layout="ListItem.layout" :total="ListItem.total">
                </el-pagination>
            </el-row>
            <br>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <!-- 弹出页 -->
        <el-dialog title="安全活动里程碑" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                //父业传参
                id: '',
                activityTimeItem: [],
                ListItem: ListItem,
                formInline: {
                    model: { },
                    offset: 0,
                    limit: 10
                },
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    activityTimeItem: '',
                    uploadPerson: '',
                },
                //表单验证
                rules: {
                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "SafetyMilestonesInputIMG.html", id); },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //获取分页数据
                GetPageData: function (currentIndex) {
                    this.formInline.model.safetyMilestoneID = this.Form.id;
                    GetPageData(this, currentIndex, '/api/ZB_SafetyMilestoneFile/GetList')
                },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                btnUpLoad: function () {
                    this.$message({
                        message: '上传成功',
                        type: 'success'
                    });
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/SafetyMilestone/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/ZB_SafetyMilestone/get?id=' + this.id);
                    //this.Form.activityTimeItem = this.Form.activityTimeItem + "";
                    this.Form.id = this.id;

                },
                //删除方法
                onDelete: function () { onDelete(this, '/api/SafetyMilestone/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                ////获取分页数据
                //GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/SafetyMilestone/GetList') },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
            },
            mounted: function () {
             
                //列表高度自适应
                tablehigh(this);
                this.id = getUrlParam("id");
                this.getData();
                //初始化数据
                this.GetPageData(1);
                //获取下拉菜单内容
                //this.hiddenTroubleClass = getDicData('59');
                //this.YNFinish = getDicData('50');
                //this.activityTimeItem = getDicData('n96');

            }
        });
    </script>
</body>

</html>